<template>
  <div class="date-picker-inputbox">
    <div>
      无初始值默认当前年月： <MonthPicker @change="timeChange"></MonthPicker>
    </div>
    <div>
      有初始值：<MonthPicker
        :default-time="initTime"
        @change="timeChange"
      ></MonthPicker>
    </div>
    <div>选择了：{{ checkTime }}</div>
  </div>
</template>
<script setup>
import { MonthPicker } from '@/components'
import { ref } from 'vue'

let initTime = ref('2021-06')
const checkTime = ref('')
const timeChange = (val) => {
  checkTime.value = val
}
</script>
<style scoped>
.date-picker-inputbox {
  width: 342px;
  background: #ffffff;
  border-radius: 6px 6px 6px 6px;
  opacity: 1;
  /* border: 1px solid #d0d7e8; */
  margin-bottom: 20px;
}
</style>
